Currently, mobile devices have gradually replaced conventional audio and video playback devices such as an MP3 and an MP4 and become main options for playing music and videos by consumers. However, as mobile devices become miniaturized, light, and thin in design, there is a higher design requirement for low power consumption. Therefore, multiple policies for reducing power consumption emerge. For example, different software policies are selected according to whether an earphone is in an in-position state (that an earphone is in an in-position state refers to a state in which the earphone is worn on an ear of a person), to achieve an objective of power consumption reduction.
In the prior art, whether an earphone is in an in-position state is detected by providing a built-in capacitive sensor in the earphone. When an earphone comes close to an ear of a person, the ear of the person causes a capacitance of a capacitive sensor to change. As a distance between the earphone and the ear of the person shortens, the capacitance of the capacitive sensor becomes larger. When the ear of the person is in direct contact with the earphone, the capacitance of the capacitive sensor reaches a maximum value. A processor determines whether the earphone is in position by using a capacitance sent by the capacitive sensor.
In the foregoing solution, a built-in capacitive sensor needs to be provided in an earphone. Therefore, the additionally added hardware increases costs of the earphone, and increases complexity of a circuit design of the earphone. Consequently, how to simply and quickly detect an in-position state of an earphone is a problem that needs to be resolved urgently.